<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;

?>
<html>

<head>

<title>商家登录</title>

<link rel="stylesheet" type="text/css" href="Css/Login_style.css" />

<script type="text/javascript" src="Javascript/Login_javascript.js"></script>

</head>

<body>

<h2 align="center">商家</h2>

<div class="login_frame"></div>

<div class="LoginWindow">

  <div>

    <form method="post" action="javascript:void(0)" onsubmit="return user_input()" class="login">

    <p>

      <label for="login">帐号:</label>

      <input type="text" name="id" id="account" value="">

    </p>



    <p>

      <label for="password">密码:</label>

      <input type="password" name="password" id="pwd" value="">

    </p>



    <p class="login-submit">
      <button class="login-button" id='login'>Login</button>

    </p>



    </form>

    <p class="registration"><a href="?w=businesslogin/register">马上注册</a></p>

  </div>

</div>

<script src='./jquery.js'></script>
<script>
  $(function(){
              $('#login').click(function(){
                      var account = $('#account').val();
                      var pwd = $('#pwd').val();
                      $.ajax({
                                'type':'get',
                                'url':'?w=businesslogin/loginajax',
                                'data':{
                                  'account':account,
                                  'pwd':pwd
                        },
                        success:function(o){
                               if(o==1){
                                alert('登录成功');
                                      window.location.href = "index.php?w=business/index";
                                }
                        }
                  })
      })
  })
</script>

<div id="timeArea"><script> LoadBlogParts();</script></div>



</body>

</html>